package wang.jingzhao.MDNotes;

import android.app.*;
import android.os.*;
import android.view.*;
import java.util.*;
import android.widget.*;

public class MainActivity extends Activity 
{
	private List<Note> NoteList = new ArrayList<Note>();
	
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
		
		//Snackbar.make(findViewById(R.id.mainLinearLayout1),"欢迎回来~",Snackbar.LENGTH_SHORT).show();
		
		initNote();
		NoteAdapter adapter = new NoteAdapter(this,R.layout.note_item,NoteList);
		ListView listview = (ListView) findViewById(R.id.mainListView1);
		listview.setAdapter(adapter);
	}
	private void initNote()
	{
		doFile dofile = new doFile();
		//Note nb = new Note("卢本伟","牛逼");
		//NoteList.add(nb);
		NoteList.add(new Note("233","cry"));
		Note[] NoteFind = null;
		NoteFind = 
		{
			new Note("First","第一测试");,,
			new Note("长字符。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。","长字符。。。。。。。。。。。。。。。。。。。。。。。。")
		};
		//dofile.listDir(getExternalStoragePublicDirectory("null"));
	}
}
